package com.vertx.mall.rest;

import com.vertx.web.annotation.RequestMethod;
import com.vertx.web.annotation.Rest;
import com.vertx.web.annotation.RestApi;
import com.vertx.web.annotation.RestRouter;
import io.vertx.core.Vertx;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.web.RoutingContext;

/**
 * 描述:
 * 创建人:hzw
 * 创建时间: 2018/4/23 14:28
 **/
@Rest
@RestRouter(path = "/user")
public class UserRest {



    @RestApi(path = "/test3",method = RequestMethod.GET)
    public void test3(RoutingContext routingContext, Vertx vertx){
        JsonObject _json = new JsonObject();
        _json.put("key","index");
        routingContext.response().end("ok");
    }

    @RestApi(path = "/test4",method = RequestMethod.POST)
    public void test4(RoutingContext routingContext, Vertx vertx){
        JsonObject _json = new JsonObject();
        _json.put("key","index");
        routingContext.response().end("ok");
    }
}
